<?php

namespace App\Http\Filters;

class PassLogFilter extends Filter
{
    protected $simpleFilters = [
        'id',
    ];

    protected $filters = [
        'housings_num',
    ];

    protected function fieldName($val)
    {
        $this->builder->where('field_name', $val);
    }

    protected function housingsNum($val)
    {

        $this->builder->whereHas('housings', function ($query) use ($val) {
            $query->where('housings_num', 'like', $val.'%');
        });
    }


}
